/* General setup */

* {
  box-sizing: border-box;
}

html,
body {
  font-family: sans-serif;
  line-height: 1.2rem;
}

/* Layout and styles */

h1 {
  color: green;
  margin-left: 0.5rem;
}

.description,
.unwrap-key {
  margin: 0 0.5rem;
}

.description > p {
  margin-top: 0;
}

.unwrap-key {
  box-shadow: -1px 2px 5px gray;
  padding: 0.2rem 0.5rem;
  margin-bottom: 2rem;
}

.unwrap-key-controls > * {
  margin: 0.5rem 0;
}

.ciphertext-value,
.signature-value {
  padding-left: 0.5rem;
  font-family: monospace;
}

.sign-button,
.encrypt-button {
  background-color: green;
  color: white;
}

.hidden {
  display: none;
}

/* Whole page grid */
main {
  display: grid;
  grid-template-columns: 36rem 1fr;
  grid-template-rows: 4rem 1fr;
}

h1 {
  grid-column: 1/2;
  grid-row: 1;
}

.examples {
  grid-column: 1;
  grid-row: 2;
}

.description {
  grid-column: 2;
  grid-row: 2;
}

/* encrypt-decrypt controls grid */
.unwrap-key-controls {
  display: grid;
  grid-template-columns: 1fr 8rem;
  grid-template-rows: 1fr 1fr;
}

.message-control {
  grid-column-start: 1;
  grid-row-start: 1;
}

.ciphertext,
.signature {
  grid-column-start: 1;
  grid-row-start: 2;
}

.unwrap-button {
  grid-column-start: 2;
  grid-row-start: 1;
}

.encrypt-button,
.sign-button {
  grid-column-start: 2;
  grid-row-start: 2;
}

/* Animate output display */
.fade-in {
  animation: fadein 0.5s;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
